<!DOCTYPE html>
<html>

<head>
<#include "/common/head.html"/>
</head>

<body>
	<div class="layui-fluid">
		<div class="layui-row">
			<form method="post" class="layui-form layui-form-pane">

				<div class="layui-form-item">
					<input type="password" name="oldPassword" lay-verify="required" placeholder="请输入旧密码" autocomplete="off" class="layui-input" lay-affix="eye">
				</div>

				<div class="layui-form-item">
					<input type="password" name="newPassword" lay-verify="required" placeholder="请输入新密码" autocomplete="off" class="layui-input" lay-affix="eye">
				</div>

				<div class="layui-form-item">
				    <div class="layui-input-block">
				      <button type="submit" class="layui-btn" lay-submit lay-filter="add">提交</button>
				      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
				    </div>
				  </div>
			</form>
		</div>
	</div>
	<script>
		layui.use(function() {
			var form = layui.form;

			form.on('submit(add)', function(data) {
				var field = data.field;
				field.oldPassword=hexMD5(field.oldPassword);
				field.newPassword=hexMD5(field.newPassword);
				winPut("/v1/user/password", field);
				return false;
			});
		});
	</script>
</body>

</html>